const express = require('express')
const app = express()
app.use(express.json())
// 拾漂流瓶
app.get('/pickup', (req, res) => {
    res.json({
        code:1,
        msg:"很高兴认识你",
        time:new Date(),
        owner:+new Date(),
        type:"male",
        content:"很高兴认识你"
    })
})
// 扔漂流瓶
app.post('/throw',(req,res,next) => {
    const { content } = req.body;
    res.status(200).json({
        code:1,
        msg:content
    })
})
app.listen(3000, () => {
    console.log('app listenning at port 3000.')
})
  